Optimal. Leaf size=18 \[ i \cot (a+i \log (x))-\log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3554, 8}
\begin {gather*} -\log (x)+i \cot (a+i \log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rubi steps
\begin {align*} \int \frac {\cot ^2(a+i \log (x))}{x} \, dx &=\text {Subst}\left (\int \cot ^2(a+i x) \, dx,x,\log (x)\right )\\ &=i \cot (a+i \log (x))-\text {Subst}(\int 1 \, dx,x,\log (x))\\ &=i \cot (a+i \log (x))-\log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.04, size = 34, normalized size = 1.89 \begin {gather*} i \cot (a+i \log (x)) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-\tan ^2(a+i \log (x))\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 29, normalized size = 1.61
method | result | size |
risch | \(-\ln \left (x \right )-\frac {2}{\frac {{\mathrm e}^{2 i a}}{x^{2}}-1}\) | \(21\) |
norman | \(\frac {-\ln \left (x \right ) \tan \left (a +i \ln \left (x \right )\right )+i}{\tan \left (a +i \ln \left (x \right )\right )}\) | \(27\) |
derivativedivides | \(-i \left (-\cot \left (a +i \ln \left (x \right )\right )+\frac {\pi }{2}-\mathrm {arccot}\left (\cot \left (a +i \ln \left (x \right )\right )\right )\right )\) | \(29\) |
default | \(-i \left (-\cot \left (a +i \ln \left (x \right )\right )+\frac {\pi }{2}-\mathrm {arccot}\left (\cot \left (a +i \ln \left (x \right )\right )\right )\right )\) | \(29\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 19, normalized size = 1.06 \begin {gather*} i \, a + \frac {i}{\tan \left (a + i \, \log \left (x\right )\right )} - \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 34 vs. \(2 (14) = 28\).
time = 3.22, size = 34, normalized size = 1.89 \begin {gather*} -\frac {{\left (x^{2} - e^{\left (2 i \, a\right )}\right )} \log \left (x\right ) - 2 \, e^{\left (2 i \, a\right )}}{x^{2} - e^{\left (2 i \, a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.17, size = 20, normalized size = 1.11 \begin {gather*} - \log {\left (x \right )} + \frac {2 e^{2 i a}}{x^{2} - e^{2 i a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 32 vs. \(2 (14) = 28\).
time = 0.42, size = 32, normalized size = 1.78 \begin {gather*} i \, a + \frac {i}{2 \, \tan \left (\frac {1}{2} \, a + \frac {1}{2} i \, \log \left (x\right )\right )} - \log \left (x\right ) - \frac {1}{2} i \, \tan \left (\frac {1}{2} \, a + \frac {1}{2} i \, \log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.49, size = 16, normalized size = 0.89 \begin {gather*} -\ln \left (x\right )+\mathrm {cot}\left (a+\ln \left (x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________